/*
 * FloatLiteralAst.cpp
 *
 *  Created on: 8 Nov 2010
 *      Author: kn308
 */

#include <MAlice/Parser/location.hh>
#include <MAlice/Ast/FloatLiteralAst.h>

namespace MAlice
{

FloatLiteralAst::FloatLiteralAst(location loc, double value) : LiteralAst(loc),
	mValue(value)
{
	MALICE_TRACE;
}

FloatLiteralAst::~FloatLiteralAst()
{
	MALICE_TRACE;
}

llvm::Value* FloatLiteralAst::generate()
{
	MALICE_TRACE;
	return ConstantFP::get(Type::getDoubleTy(Codegen::get()->getContext()), mValue);
}

}
